<include file="Public/header"/>
<include file="Public/menu"/>
<div class="page-content">
	<div class="page-header">
		<h1>
			简历管理
			<small>
				<i class="icon-double-angle-right"></i>
				所有简历
			</small>
		</h1>
	</div>
	<!-- /.page-header -->
	<!-- PAGE CONTENT BEGINS -->
	<div class="row">
		<div class="col-xs-12">
			<div class="row">
				<div class="tabbable">
					<ul class="nav nav-tabs" id="myTab">
						<li class="active">
							<a href="http://localhost/vivo/Wolf/index.php/Admin/Resume/index">
								<i class="green icon-group bigger-110"></i>
								所有简历
							</a>
						</li>
					</ul>

					<!-- list start -->
					<div class="table-content">
						<div class="tab-pane in active">
							<div class="table-responsive">
								<table id="sample-table" class="table table-striped table-bordered table-hover">
									<thead>
									<tr>
										<th>ID</th>
										<th>用户ID</th>
										<th>真实姓名</th>
										<th>性别</th>
										<th>学历</th>
										<th>期望城市</th>
										<th>期望职位</th>
										<th>状态</th>
										<th>操作</th>
									</tr>
									</thead>
								</table>
							</div>
						</div>
					</div>
					<!-- list end -->
				</div>
			</div>
		</div>
	</div>
	<!-- PAGE CONTENT END -->
</div>

<script type="text/javascript">
	seajs.use(['admin-common', '$', 'dataTables', "dataTables-bootstrap"], function (admin, $) {
		var oTable1 = $('#sample-table').dataTable({
			"aaSorting" : [[0, "desc"]], //默认的排序方式，第1列，降序排列
			"bAutoWidth" : false,//是否自适应宽度
			"aLengthMenu" : [[10, 25, 50, 100], [10, 25, 50, 100]],//每页显示数据量
			"aoColumns" : [ //列操作
				{"mData" : "id", "sClass" : "center", bSortable : false},
				{"mData" : "uid", "sClass" : "center", bSortable : false},
				{"mData" : "truename", "sClass" : "center", bSortable : false},
				{
					"mData" : "sex",
					"sClass" : "center",
					bSortable : false,
					"mRender" : function (data) {
						if ( data == 1 ) {
							return "男";
						} else {
							return "女";
						}
					}
				},
				{
					"mData" : "eid",
					"sClass" : "center",
					bSortable : false,

				},
				{
					"mData" : "hopecid",
					"sClass" : "center",
					bSortable : false,
					/**
					 "mRender" : function (data) {
						//等待城市列表ID后再写具体方法
					}
					 */
				},
				{
					"mData" : "hopejob",
					"sClass" : "center",
					bSortable : false,
					/**
					 "mRender" : function (data) {
						//等待职位列表后再写具体方法
					}
					 */
				},
				{
					"mData" : "status",
					"sClass" : "center",
					bSortable : false,
					"mRender" : function (data) {
						var res = "";
						switch (data) {
							case "1":
								res = "目前在职，准备换个新环境";
								break;
							case "2":
								res = "目前离职，可快速到岗";
								break;
							case "3":
								res = "应聘毕业生";
								break;
							case "4":
								res = "暂时不找工作";
								break;
						}
						return res;
					}
				},
				{
					bSortable : false,
					"sWidth" : "10%",
					"sClass" : "center",
					"mData" : "id",
					"mRender" : function (data) {
						var detailsurl = "/vivo/Wolf/index.php/Admin/Resume/details?id=" + data;

						var res = "<div class='visible-md visible-lg hidden-sm hidden-xs action-buttons'>";
						res += '<a class="green" href="' + detailsurl + '" title="详细资料">';
						res += '<i class="icon-zoom-in bigger-130"></i>&nbsp;详细资料</a></div>';
						return res;
					}
				}
			],

			//与服务器端传输数据
			"bServerSide" : true,//服务端处理分页
			"sAjaxSource" : "/vivo/Wolf/index.php/Admin/Resume/resumeList",
			"sServerMethod" : "POST",
			//"bProcessing": true,

			//多语言配置
			"oLanguage" : {
				"sProcessing" : "正在加载中......",
				"sLengthMenu" : "每页显示 _MENU_ 条记录",
				"sZeroRecords" : "对不起，查询不到相关数据！",
				"sEmptyTable" : "表中无数据存在！",
				"sInfo" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
				"sInfoFiltered" : "数据表中共为 _MAX_ 条记录",
				"sSearch" : "搜索",
				"oPaginate" : {
					"sFirst" : "首页",
					"sPrevious" : "上一页",
					"sNext" : "下一页",
					"sLast" : "末页"
				}
			}
		});

	});
</script>
<include file="Public/footer"/>